package com.hhxyjsj.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * 租房中介
 * @author Puhui
 *
 */
public class HouseProxy implements InvocationHandler {
	
	private IHouse iHouse;
	
	public HouseProxy(IHouse iHouse){
		this.iHouse = iHouse;
	}

	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("中介开始搜过房源!");
		method.invoke(iHouse, args);
		System.out.println("中介帮忙找到房子!");
		return "";
	}

}
